<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
    <title>页面调整</title>
	<style>
	  p{
	    text-align:center
	  }
	  span{
	  color:red
	  }
	</style>
</head>
<body>
<p><span id="endNum">5</span> 秒后页面跳转...</p>
<script>
  var endNum=document.getElementById("endNum"); 
  var num=5;
  function showtime(){
	num--;
	endNum.innerHTML=num;
	if(num==0)location.href="http://www.baidu.com";
  }
  setInterval(showtime,1000);
</script>
</body>
</html>